import request from '@/utils/request';
import { AxiosPromise } from 'axios';

/**
 * 查询行业类型列表
 * @param query
 * @returns {*}
 */

export const listResumeTemplateIndustryType = (query?: any): AxiosPromise<any[]> => {
  return request({
    url: '/business/resumeTemplateIndustryType/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询行业类型详细
 * @param industryId
 */
export const getResumeTemplateIndustryType = (industryId: string | number): AxiosPromise<any> => {
  return request({
    url: '/business/resumeTemplateIndustryType/' + industryId,
    method: 'get'
  });
};

/**
 * 新增行业类型
 * @param data
 */
export const addResumeTemplateIndustryType = (data: any) => {
  return request({
    url: '/business/resumeTemplateIndustryType',
    method: 'post',
    data: data
  });
};

/**
 * 修改行业类型
 * @param data
 */
export const updateResumeTemplateIndustryType = (data: any) => {
  return request({
    url: '/business/resumeTemplateIndustryType',
    method: 'put',
    data: data
  });
};

/**
 * 删除行业类型
 * @param industryId
 */
export const delResumeTemplateIndustryType = (industryId: string | number | Array<string | number>) => {
  return request({
    url: '/business/resumeTemplateIndustryType/' + industryId,
    method: 'delete'
  });
};
